Skip to content

fix(billing): Prevent crash on invalid data category for plan#112419

Closed
volokluev wants to merge 1 commit intomasterfrom
volokluev/fix/billing-page-crash-invalid-data-category
Closed

fix(billing): Prevent crash on invalid data category for plan#112419
volokluev wants to merge 1 commit intomasterfrom
volokluev/fix/billing-page-crash-invalid-data-category

Conversation

@volokluev
Copy link
Copy Markdown
Member

The billing overview page (/settings/billing/overview/) was crashing when the getBucket function encountered a data category that didn't have a corresponding bucket in the plan's configuration.

This could happen when:

  • A plan has an unexpected or newly added data category (e.g., seer_user)
  • The plan's bucket configuration is incomplete or mismatched

Changes:

  • Modified getBucket to report errors to Sentry with full context (buckets, events, price, shouldMinimize)
  • Returns a fallback bucket with zero price instead of throwing an error
  • The page now continues to render instead of crashing

Impact:

  • Users no longer experience crashes on the billing page
  • We still get error reports in Sentry to investigate which data categories are causing issues
  • The affected product row displays with $0 additional spend (a safe fallback)

This maintains observability while providing a better user experience.

The getBucket function would throw an error when it couldn't find a
valid bucket for a data category, causing the billing overview page
to crash. Now it reports the error to Sentry with full context but
returns a fallback bucket with zero price, allowing the page to
continue rendering.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 7, 2026
@volokluev volokluev closed this Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant